/**
 * Copyright 2008-2009 HAN.BIFANG
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package han.bashe.common.entity;
import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * 
 * 
 * @author Kent
 */
public class SoaMessageLog  implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private String id;
	private String conversationId;
	private String logTime;
	private String replyServiceCode;
	private String replyVersion;
	private String requestApplication;
	private String requestId;
	private String serviceCode;
	private String serviceResponseTime;
	private String status;
	private String version;

    public SoaMessageLog() {
    }

	public String getId() {
		return this.id;
	}
	public void setId(String id) {
		this.id = id;
	}

	public String getConversationId() {
		return this.conversationId;
	}
	public void setConversationId(String conversationId) {
		this.conversationId = conversationId;
	}

	public String getLogTime() {
		return this.logTime;
	}
	public void setLogTime(String logTime) {
		this.logTime = logTime;
	}

	public String getReplyServiceCode() {
		return this.replyServiceCode;
	}
	public void setReplyServiceCode(String replyServiceCode) {
		this.replyServiceCode = replyServiceCode;
	}

	public String getReplyVersion() {
		return this.replyVersion;
	}
	public void setReplyVersion(String replyVersion) {
		this.replyVersion = replyVersion;
	}

	public String getRequestApplication() {
		return this.requestApplication;
	}
	public void setRequestApplication(String requestApplication) {
		this.requestApplication = requestApplication;
	}

	public String getRequestId() {
		return this.requestId;
	}
	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public String getServiceCode() {
		return this.serviceCode;
	}
	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getServiceResponseTime() {
		return this.serviceResponseTime;
	}
	public void setServiceResponseTime(String serviceResponseTime) {
		this.serviceResponseTime = serviceResponseTime;
	}

	public String getStatus() {
		return this.status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	public String getVersion() {
		return this.version;
	}
	public void setVersion(String version) {
		this.version = version;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SoaMessageLog)) {
			return false;
		}
		SoaMessageLog castOther = (SoaMessageLog)other;
		return new EqualsBuilder()
			.append(this.getId(), castOther.getId())
			.isEquals();
    }
    
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
    }   

	public String toString() {
		return new ToStringBuilder(this)
			.append("id", getId())
			.append("logTime", getLogTime())
			.append("replyServiceCode", getReplyServiceCode())
			.append("replyVersion", getReplyVersion())
			.append("requestApplication", getRequestApplication())
			.append("requestId", getRequestId())
			.append("serviceCode", getServiceCode())
			.append("serviceResponseTime", getServiceResponseTime())
			.append("status", getStatus())
			.append("version", getVersion())
			.toString();
	}
}